/*    */ package com.feeyin.radar.sys.service.impl;
/*    */ 
/*    */ import com.feeyin.radar.sys.dao.DataInterfaceDAO;
/*    */ import com.feeyin.radar.sys.model.DataInterface;
/*    */ import com.feeyin.radar.sys.service.DataInterfaceService;
/*    */ 
/*    */ public class DataInterfaceServiceImpl
/*    */   implements DataInterfaceService
/*    */ {
/*    */   private DataInterfaceDAO dataInterfaceDAO;
/*    */ 
/*    */   public DataInterfaceDAO getDataInterfaceDAO()
/*    */   {
/* 18 */     return this.dataInterfaceDAO;
/*    */   }
/*    */ 
/*    */   public void setDataInterfaceDAO(DataInterfaceDAO dataInterfaceDAO) {
/* 22 */     this.dataInterfaceDAO = dataInterfaceDAO;
/*    */   }
/*    */ 
/*    */   public DataInterface getDataInterface() {
/* 26 */     return this.dataInterfaceDAO.getDataInterface();
/*    */   }
/*    */ 
/*    */   public boolean updateDataInterface(DataInterface dataInterface) {
/* 30 */     if (dataInterface == null) return false;
/* 31 */     boolean result = false;
/* 32 */     DataInterface dataInterface1 = new DataInterface();
/* 33 */     dataInterface1 = this.dataInterfaceDAO.getDataInterface();
/* 34 */     if (dataInterface1 == null) {
/* 35 */       result = this.dataInterfaceDAO.insertDataInterface(dataInterface);
/*    */     } else {
/* 37 */       if (dataInterface.getId() == null) return false;
/* 38 */       result = this.dataInterfaceDAO.updateDataInterface(dataInterface);
/*    */     }
/* 40 */     if (result) {
/* 41 */       dataInterface = new DataInterface();
/* 42 */       dataInterface = this.dataInterfaceDAO.getDataInterface();
/* 43 */       if (dataInterface == null) return false;
/* 44 */       this.dataInterfaceDAO.sendEmail(dataInterface.getUserName(), "Email setting success!", "Email setting success!");
/*    */     }
/* 46 */     return result;
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.service.impl.DataInterfaceServiceImpl
 * JD-Core Version:    0.6.0
 */